﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace ImportDB
{
    public class XLSFile:PlainDataFileBase, IPlainDataFile
    {
        private string fileName;
        public XLSFile(string fileName)
        {
            this.fileName = fileName;
        }

        
        public System.Data.DataTable GetDataTable()
        {
            string connectionString = "Provider=Microsoft.Jet.Oledb.4.0; Data Source=" + this.fileName + "; Extended Properties=\"Excel 8.0\"";
            string sql = "select * from [sheet1$]" ;
            DataTable dt = GetTable(connectionString, sql);
            return dt;
        }

        
        
    }
}